<template>
  <div class="chart-test-container">
    <h2>销售趋势图表测试</h2>
    
    <div class="test-controls">
      <div class="control-group">
        <label>显示选项：</label>
        <div class="checkbox-group">
          <label>
            <input type="checkbox" v-model="showSales">
            销售额
          </label>
          <label>
            <input type="checkbox" v-model="showOrders">
            订单数
          </label>
          <label>
            <input type="checkbox" v-model="showCommission">
            佣金
          </label>
        </div>
      </div>
    </div>
    
    <div class="chart-wrapper">
      <SalesTrendChart
        title="销售趋势分析"
        :showSales="showSales"
        :showOrders="showOrders"
        :showCommission="showCommission"
      />
    </div>
  </div>
</template>

<script setup lang="ts">
import { ref } from 'vue';
import SalesTrendChart from './SalesTrendChart.vue';

// 控制图表显示的数据系列
const showSales = ref(true);
const showOrders = ref(true);
const showCommission = ref(true);
</script>

<style lang="scss" scoped>
.chart-test-container {
  padding: 24px;
  
  h2 {
    margin-top: 0;
    margin-bottom: 24px;
    font-size: 24px;
    color: #2f3542;
  }
  
  .test-controls {
    margin-bottom: 24px;
    padding: 16px;
    background-color: #f8f9fa;
    border-radius: 8px;
    
    .control-group {
      display: flex;
      align-items: center;
      
      label {
        margin-right: 16px;
        font-weight: 500;
      }
      
      .checkbox-group {
        display: flex;
        gap: 24px;
        
        label {
          display: flex;
          align-items: center;
          font-weight: normal;
          cursor: pointer;
          
          input {
            margin-right: 8px;
          }
        }
      }
    }
  }
  
  .chart-wrapper {
    min-height: 400px;
  }
}

@media (max-width: 768px) {
  .chart-test-container {
    padding: 16px;
    
    h2 {
      font-size: 20px;
      margin-bottom: 16px;
    }
    
    .test-controls {
      padding: 12px;
      
      .control-group {
        flex-direction: column;
        align-items: flex-start;
        
        label {
          margin-bottom: 8px;
        }
        
        .checkbox-group {
          gap: 16px;
        }
      }
    }
  }
}
</style> 